﻿using Demo.Api.Entities;

namespace Demo.Api.Models
{
    /// <summary>
    ///     事项实例
    /// </summary>
    public class AffairObjectDto
    {
        /// <summary>
        ///     事项Id
        /// </summary>
        public long AffairId { get; set; }

        /// <summary>
        ///     流程图Id
        /// </summary>
        public long FlowChartId { get; set; }

        /// <summary>
        ///     姓名
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        ///     请假类型：1 事假，2 年假，3 婚假
        /// </summary>
        public int Type { get; set; }

        /// <summary>
        ///     天数
        /// </summary>
        public int Num { get; set; }

        /// <summary>
        ///     经理
        /// </summary>
        public string Manager { get; set; }

        /// <summary>
        ///     主任
        /// </summary>
        public string Director { get; set; }

        public AffairObjectDo To()
        {
            return new AffairObjectDo
            {
                FlowChartId = FlowChartId,
                AffairId = AffairId,
                Director = Director,
                Manager = Manager,
                Name = Name,
                Num = Num,
                Type = Type
            };
        }
    }
}